# -*- coding:utf-8 -*-
# __author__ : "张百科"
# Date: 2021/1/25 21:11
# File: advise.py
# IDE: PyCharm
from django.db import models
from utils.common import prefix
from utils.choices import advise_category_choices

class Advise(models.Model):

    id = models.AutoField(db_column='ID', primary_key=True)  # Field name made lowercase.
    wx_user_id= models.IntegerField(db_column='wx_user_id', blank=True)
    category = models.CharField(max_length=50,choices=advise_category_choices)
    content = models.CharField(max_length=1000)
    create_time = models.DateTimeField(auto_now=True)
    reply = models.CharField(max_length=1000, blank=True, null=True)
    reply_time = models.DateTimeField(blank=True, null=True)
    is_satisfied = models.IntegerField(default=1)
    is_delete = models.IntegerField(default=0)
    is_public=models.IntegerField(default=0)
    read_count=models.IntegerField(default=0)

    class Meta:
        managed = False
        db_table = prefix+'advise'